﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace NextGenSystems.WHMCS
{
    [DataContract()]
    public class GetTicketRS : WHMCSBASE
    {
        private int _TotalResults;
        private int _StartNumber;
        private int _NumReturned;
        private List<Ticket> _Ticket;


        [DataMember()]
        public List<Ticket> Ticket
        {
            get { return _Ticket; }
            set
            {
                if (_Ticket != value)
                {
                    _Ticket = value;
                }
            }
        }

        [DataMember()]
        public virtual int TotalResults
        {
            get { return _TotalResults; }
            set
            {
                if (_TotalResults != value)
                {
                    _TotalResults = value;
                    NotifyPropertyChanged("TotalResults");
                }
            }
        }

        [DataMember()]
        public virtual int StartNumber
        {
            get { return _StartNumber; }
            set
            {
                if (_StartNumber != value)
                {
                    _StartNumber = value;
                    NotifyPropertyChanged("StartNumber");
                }
            }
        }

        [DataMember()]
        public virtual int NumReturned
        {
            get { return _NumReturned; }
            set
            {
                if (_NumReturned != value)
                {
                    _NumReturned = value;
                    NotifyPropertyChanged("NumReturned");
                }
            }
        }
    }

    public class Ticket
    {

        private String _Id;
        private String _Tid;
        private String _Deptid;
        private String _Userid;
        private String _Name;
        private String _Email;
        private String _Cc;
        private String _C;
        private String _Date;
        private String _Subject;
        private String _Message;
        private String _Status;
        private String _Priority;
        private String _Admin;
        private String _Attachment;
        private String _Lastreply;
        private String _Flag;
        private String _Service;
        private List<Reply> _Reply;

        [DataMember()]
        public String Id
        {
            get { return _Id; }
            set { _Id = value; }
        }

        [DataMember()]
        public String Tid
        {
            get { return _Tid; }
            set { _Tid = value; }
        }
        [DataMember()]
        public String Deptid
        {
            get { return _Deptid; }
            set { _Deptid = value; }
        }

        [DataMember()]
        public String Userid
        {
            get { return _Userid; }
            set { _Userid = value; }
        }

        [DataMember()]
        public String Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        [DataMember()]
        public String Email
        {
            get { return _Email; }
            set { _Email = value; }
        }

        [DataMember()]
        public String Cc
        {
            get { return _Cc; }
            set { _Cc = value; }
        }
        [DataMember()]
        public String C
        {
            get { return _C; }
            set { _C = value; }
        }
        [DataMember()]
        public String Date
        {
            get { return _Date; }
            set { _Date = value; }
        }

        [DataMember()]
        public String Subject
        {
            get { return _Subject; }
            set { _Subject = value; }
        }

        [DataMember()]
        public String Message
        {
            get { return _Message; }
            set { _Message = value; }
        }

        [DataMember()]
        public String Status
        {
            get { return _Status; }
            set { _Status = value; }
        }

        [DataMember()]
        public String Priority
        {
            get { return _Priority; }
            set { _Priority = value; }
        }

        [DataMember()]
        public String Admin
        {
            get { return _Admin; }
            set { _Admin = value; }
        }

        [DataMember()]
        public String Attachment
        {
            get { return _Attachment; }
            set { _Attachment = value; }
        }

        [DataMember()]
        public String Lastreply
        {
            get { return _Lastreply; }
            set { _Lastreply = value; }
        }
        [DataMember()]
        public String Flag
        {
            get { return _Flag; }
            set { _Flag = value; }
        }


        [DataMember()]
        public String Service
        {
            get { return _Service; }
            set { _Service = value; }
        }

        [DataMember()]
        public List<Reply> Reply
        {
            get { return _Reply; }
            set { _Reply = value; }
        }
    }

    public class Reply
    {
        private String _Userid;
        private String _Name;
        private String _Email;
        private String _Date;
        private String _Message;
        private String _Attachment;
        private String _Admin;

        [DataMember()]
        public String Userid
        {
            get { return _Userid; }
            set { _Userid = value; }
        }
        [DataMember()]
        public String Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
        [DataMember()]
        public String Email
        {
            get { return _Email; }
            set { _Email = value; }
        }
        [DataMember()]
        public String Date
        {
            get { return _Date; }
            set { _Date = value; }
        }
        [DataMember()]
        public String Message
        {
            get { return _Message; }
            set { _Message = value; }
        }
        [DataMember()]
        public String Attachment
        {
            get { return _Attachment; }
            set { _Attachment = value; }
        }

        [DataMember()]
        public String Admin
        {
            get { return _Admin; }
            set { _Admin = value; }
        }

    }
}
